package cn.hp.controller;

import java.util.Date;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.hp.domain.Student;

@Controller
@RequestMapping("/hello")
public class HelloController {

	
	@RequestMapping("/test")
	@ResponseBody //返回的数据是json数据
	public Student test(Date birth) {
		//转换成时间格式
		System.out.println(birth);
		
		return new Student(1,"张三","河南郑州","男",birth,18.2);
	}
}
